<template>
	<van-popup v-model="show" position="bottom" :style="{ height: '100%' }">
		<cus-search :key="show" title="查找客户" @click-left="close" @click-item="onClickItem" />
	</van-popup>
</template>
<script>
import { Popup } from "vant";
import CusSearch from "./cus-search";

export default {
	name: "m-cus-search-popup",
	components: {
		VanPopup: Popup,
		CusSearch
	},
	data() {
		return {
			show: false,
			type: ""
		};
	},
	methods: {
		open(type) {
			this.type = type;
			this.show = true;
		},
		close() {
			this.show = false;
		},
		// item点击
		onClickItem(item) {
			this.$emit("click-item", item);
		}
	}
};
</script>
